package com.example.frameboot.common;

import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.util.List;

/**
 * @author zhujy7@centaline.com.cn
 * @description 返回列表
 * @date 2020/1/8 15:19
 */
@Getter
@Setter
@NoArgsConstructor
public class ListResp<T> extends BaseResp {

    @ApiModelProperty(value = "数据", position = 4)
    private List<T> data;

    public ListResp(List<T> data) {
        super();
        this.data = data;
    }

    /**
     * 新增构造包含响应码情况
     *
     * @param data
     * @param code
     * @param message
     */
    public ListResp(List<T> data, Integer code, String message) {
        super(code, message);
        this.data = data;
    }


}
